package com.shopping.jwt;

import com.shopping.utils.RSAUtils;

import java.io.IOException;
import java.security.NoSuchAlgorithmException;

public class RSATest {

    public static void main(String[] args) throws NoSuchAlgorithmException, IOException {
         //公钥文件名
        String publicKeyFileName ="D:\\Java源码\\demo\\shopping\\myshopping-project-server\\src\\main\\resources\\Keys\\key.public";
        //私钥文件吗
        String privateKeyFileName ="D:\\Java源码\\demo\\shopping\\myshopping-project-server\\src\\main\\resources\\Keys\\key.private";

        /**
         *生成公钥和私钥
         *
         * 参数1:公钥文件名
         * 参数2:私钥文件名
         * 参数3:盐
         * 参数4:尺寸
         */

        RSAUtils.generateKey(publicKeyFileName,privateKeyFileName,"huozhexiao",1024);
    }
}
